package com.wwj.study.observer.curd;

import com.wwj.study.observer.core.EventLisenter;

/**
 * @Author: wuweijun
 * @Date: 2018/11/20 15:31
 */

//被观察者
public class Subject extends EventLisenter {


    public void add(){
        System.out.println("添加方法");
        //注册事件
        trigger(SubjectEventType.add);
    }

    public void update(){
        System.out.println("修改方法");
        trigger(SubjectEventType.update);
    }

    public void delete(){
        System.out.println("删除方法");
    }

    public void query(){
        System.out.println("查询方法");
    }
}
